package com.twu.biblioteca;

public class Membership {
    //This area is under construction
    public static void Message(){
        System.out.println("Please talk to a librarian.Thank you.");
    }
    public static void ShowDetails(String username,User UserList[],int n){
        int i;
        for (i=0;i<n;i++){
            if(username.equals(UserList[i].Username)){
                System.out.println("Name :"+UserList[i].name);
                System.out.println("Email :"+UserList[i].email);
                System.out.println("Phone Number : "+UserList[i].phno);
                return;
            }

        }
    }
    public static int Login(String Username,String Password,User Userlist[],int n){
        int i;
        for(i=0;i<n;i++){
            if (Userlist[i].Username.equals(Username))
            {
                if(Userlist[i].Password.equals(Password))
                    return 1;
                else
                    break;
            }
        }
        return 0;
    }
}
